import request from '@/utils/request';
// 网络流量概况
export function querySystemFlowList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/list',
		method: 'post',
		data: data,
	});
}

/** 监测详情页面 */
// 系统网络流量监测详情概况（头部信息）
export function queryOverviewData(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/queryNetworkTraffic',
		method: 'post',
		data: data,
	});
}

// 系统与系统之间流量交互概况列表
export function queryFlowInteraction(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/queryFlowInteraction',
		method: 'post',
		data: data,
	});
}

// 系统网端平均比特率变化趋势
export function querySegmentAvgByteRateTrend(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/querySegmentAvgByteRateTrend',
		method: 'post',
		data: data,
	});
}

// 网端与网端之间流量交互概况列表
export function querySegmentFlowInteraction(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/querySegmentFlowInteraction',
		method: 'post',
		data: data,
	});
}

// 网络流量概况IT路径图
export function queryNetworkFlowItRoad(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/queryNetworkFlowItRoad',
		method: 'post',
		data: data,
	});
}

// 网络流量概况IT路径图修改节点坐标数据
export function updateSegmentPosition(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/saveOrUpdateSegmentPosition',
		method: 'post',
		data: data,
	});
}

// 网络流量概况列表
export function queryNetworkFlowList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/queryNetworkFlowList',
		method: 'post',
		data: data,
	});
}

// 应用组件比特率变化趋势
export function queryComponentByteRateTrend(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/queryComponentByteRateTrend',
		method: 'post',
		data: data,
	});
}

// 应用组件详情下载
export function exportComponentDetail(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/network/system/flow/export/componentDetail',
		method: 'post',
		data: data,
		timeout: 3000000,
		responseType: 'blob',
	});
}
